package com.sanhuo.idms.dao;

import com.sanhuo.idms.bo.RepairSearchBO;
import com.sanhuo.idms.dao.provider.RepairProvider;
import com.sanhuo.idms.entity.Repair;
import com.sanhuo.idms.vo.RepairPageVO;
import com.sanhuo.triild.Basic.BaseMapper;
import com.sanhuo.triild.annotation.Mapper;
import com.sanhuo.triild.annotation.Select;
import com.sanhuo.triild.annotation.SelectProvider;
import com.sanhuo.triild.annotation.Update;
import com.sanhuo.triild.page.Page;
import com.sanhuo.triild.page.PageSearch;

import java.util.List;

@Mapper
public interface RepairMapper extends BaseMapper<Repair> {

    @SelectProvider(type = RepairProvider.class, method = "page")
    Page<RepairPageVO> listAll(RepairSearchBO bo, PageSearch pageSearch);

    @SelectProvider(type = RepairProvider.class, method = "findByIds")
    List<RepairPageVO> findByIds(List<String> ids);

    @Select("select count(*) from repair where state = #{state}")
    Integer countUnPass(Integer state);
}
